﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:StoryMaker.Application"
    xmlns:common="clr-namespace:StoryMaker.Common;assembly=StoryMaker.Common"
        xmlns:shapes="clr-namespace:System.Windows.Shapes;assembly=PresentationFramework"
        xmlns:drag="clr-namespace:ItemsControlDragDropBehavior.Library;assembly=ItemsControlDragDropBehaviorLibrary"
		xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
        xmlns:dragcanvas="clr-namespace:WPF.JoshSmith.Controls" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" 
    xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" 
    mc:Ignorable="d" 
    x:Class="StoryMaker.Application.MainWindow"
        Title="Story Maker" Height="350" Width="525" >
	<Window.Resources>
        <ItemsPanelTemplate x:Key="CanvasPanelTemplate">
			<dragcanvas:DragCanvas IsItemsHost="True" AllowDrop="True" />
		</ItemsPanelTemplate>
	</Window.Resources>
    <Grid >
    	<Grid>
    		<Grid.ColumnDefinitions>
    			<ColumnDefinition Width="Auto" />
    			<ColumnDefinition/>
    			<ColumnDefinition Width="50"/>
    			<ColumnDefinition Width="Auto" />
    		</Grid.ColumnDefinitions>
    		<Grid.RowDefinitions>
    			<RowDefinition Height="Auto"/>
    			<RowDefinition/>
    		</Grid.RowDefinitions>
            <ContentControl Content="{Binding ShapeViewTemplates}" Grid.Column="1" Grid.ColumnSpan="1" />
			<Grid Grid.Column="2">
				<Grid.RowDefinitions>
					<RowDefinition Height="0.5*"/>
					<RowDefinition Height="0.5*"/>
				</Grid.RowDefinitions>
				<ToggleButton IsChecked="{Binding Path=ShowAllPages, Converter={StaticResource OppositeBoolConverter}}">
					<Rectangle Width="40" Height="40" Fill="#FF2622A1" />
				</ToggleButton>
				<ToggleButton Grid.Row="1" IsChecked="{Binding ShowAllPages}">
					<Grid Width="40" Height="40">
						<Grid.RowDefinitions>
							<RowDefinition Height="0.5*"/>
							<RowDefinition Height="0.5*"/>
						</Grid.RowDefinitions>
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="0.5*"/>
							<ColumnDefinition Width="0.5*"/>
						</Grid.ColumnDefinitions>
						<Rectangle Margin="3" Fill="#FF2622A1" />
						<Rectangle Margin="3" Fill="#FF2622A1" Grid.Column="1" />
						<Rectangle Margin="3" Fill="#FF2622A1" Grid.Row="1" />
						<Rectangle Margin="3" Fill="#FF2622A1" Grid.Column="1" Grid.Row="1" />
						</Grid>
				</ToggleButton>
			</Grid>
        	<Button Content="Next" Grid.Column="0" Grid.Row="1" Command="{Binding PreviousPage}" Style="{DynamicResource SideButton}" Width="25" ToolTip="Previous page"/>
    		<Button Content="" Grid.Column="3" Grid.Row="1" Command="{Binding NextPage}" Width="25" Style="{DynamicResource SideButton}" RenderTransformOrigin="0.5,0.5" ToolTip="Next page">
    			<Button.RenderTransform>
    				<TransformGroup>
    					<ScaleTransform ScaleY="1" ScaleX="-1"/>
    					<SkewTransform AngleY="0" AngleX="0"/>
    					<RotateTransform Angle="0"/>
    					<TranslateTransform/>
    				</TransformGroup>
    			</Button.RenderTransform>
    		</Button>
            <ContentControl Grid.Column="1" Grid.Row="1" Content="{Binding CurrentView}" Grid.ColumnSpan="2" />
        </Grid>
    	
    </Grid>
</Window>
